package com.webblog.dao.blog;

import com.webblog.pojo.Blog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BlogMapper {
    Integer insertNewBlog(Blog blog);

    List getBlogList(@Param("isDraft") int isDraft);

    Blog getBlogDetailById(@Param("blogId") int id);

    Integer updateBlog(Blog blog);

    Integer toRecovery(@Param("blogId") int blogId);

    Integer recovery(@Param("blogId") int blogId);

    List getCoveryList(@Param("isCovery") int isCovery);

    Integer deleteBlog(@Param("blogId") int blogId);

    Integer publishBlog(@Param("blogId") int blogId);

    List searchBlog(@Param("title") String title);

    List getRecentBlog();

    List getBlogByClassifyId(@Param("classifyId") int classifyId);

    Integer updateReadCount(@Param("blogId") int blogId);
}
